package cn.fzkj.gulimall.vo;

import cn.fzkj.common.to.es.SkuEsModel;
import lombok.Data;

import java.util.List;

/**
 * @DESCRIPTION  es 返回结果封装
 * @Author yaya
 * @DATE 2022/6/16
 */
@Data
public class SearchResult {

    /**
     * 查询的商品信息
     */
    private List<SkuEsModel> products;

    private Integer pageNum;

    private Long total;

    private Integer totalPage;

    private List<BrandVo> brands; // 所有品牌
    private List<AttrVo> attrs; //所有属性
    private List<CatalogVo> catalogs; // 所有分类

    @Data
    public static class BrandVo {
        private Long brandId;
        private String brandName;
        private String brandImg;
    }

    @Data
    public static class AttrVo{
        private Long attrId;
        private String attrName;

        private List<String> attrValue;
    }

    @Data
    public static class CatalogVo{
        private Long catalogId;
        private String catalogName;
    }
}